package ru.ifmo.network.skype.network.data;

/**
 * @author avhaliullin
 */
public enum TCPCommand {
    USER_DATA(0),
    SECURE(1),
    GROUP(2);
    private final int value;

    TCPCommand(int value) {
        this.value = value;
    }

    public static TCPCommand getByValue(int value) {
        for (TCPCommand command : values()) {
            if (command.value == value) {
                return command;
            }
        }
        return null;
    }

    public int getValue() {
        return value;
    }
}
